<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./jquery.min.js"></script>
    <style>
      div {
        width: 100px;
        height: 100px;
        background-color: hotpink;
        position: absolute;
        left: 100px;
        top: 100px;
      }
    </style>
  </head>
  <body>
    <button id="btn">动起来</button>
    <div></div>

    <script>
      $(function () {
        $('#btn').on('click', function () {
          $('div').animate(
            {
              left: 500,
              top: 300,
              opacity: 0.4,
              width: 500,
            },
            500
          )
        })
      })
    </script>
  </body>
</html>
